//
//  main.m
//  oc_25
//
//  Created by 楼楚 on 15/9/17.
//  Copyright (c) 2015年 Chu Lou. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef int (^myBlock4) (NSString *str1, NSString *str2);


int main(int argc, const char * argv[]) {
    @autoreleasepool {
      
        void (*intPoint) (int a , int b );//声明一种指向 无返回值 带两个int类型参数的函数 的指针
        
        void (^myBlock1) (int a , int b);//声明一无返回值 带两个int类型参数的函数 blocks
        
        myBlock1 = ^(int a ,int b){
        
        
        
            NSLog(@"make up my block");
        
        
        };
        
        myBlock1 (3,5);
        
        int (^myBlock2) (int a,int b)= ^(int a,int b){
            
            return a + b ;
            
        };
        NSLog(@"%d",myBlock2(3,5));
        
        myBlock4 myBlock = ^ (NSString *str1, NSString *str2){
            
            NSLog(@"%@---%@",str1,str2);
            
            return 0;
            
        };
        myBlock(@"hello",@"Block");
        
    }
    return 0;
}
